package cn.liip.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class UserInfoController {
	 //定义一个全局的记录器，通过LoggerFactory获取
    private final static Logger logger = LoggerFactory.getLogger(UserInfoController.class); 
    @RequestMapping(value = "/user")
    public String logs(){
    	logger.error("我是{}日志输出","error");
    	logger.info("我是{}日志输出","info");
    	logger.warn("我是{}日志输出","warn");
    	return "日志输出";
    }

}